'''
查找多个元素
'''
import time

from selenium import webdriver
from selenium.webdriver.common.by import By

d = webdriver.Edge() # 获取浏览器
d.get("https://www.sogou.com")
time.sleep(2) # 等待页面加载

# 定位所有a标签
aelments = d.find_elements(By.TAG_NAME,"a")
print(aelments) # WebElement
# for ae in aelments: # ae代表查询出的单个元素信息
    # print(ae.get_dom_attribute("href"))
    # print(ae.text)  # a标签的文本  <a>百度</a>

imgs = d.find_elements("tag name","img")
for img in imgs:
    print(img.get_dom_attribute("src"))


